﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _14while循环
{
    class Program
    {
        static void Main(string[] args)
        {
            //int a = 0;
            //while (a < 100)
            //{
            //    Console.WriteLine("下次考试一定要认真");
            //    a++;
            //}





            //练习一
            //Console.WriteLine("请输入班级人数：");
            //int a = Convert.ToInt32(Console.ReadLine());
            //int c = 0;//存用户输入的分数
            //int i = 0;
            //int sum = 0;//用于存总成绩
            //while (i < a)
            //{
            //    Console.WriteLine("请输入第{0}名学员成绩：", i + 1);
            //    c = Convert.ToInt32(Console.ReadLine());
            //    sum += c;
            //    i++;
            //}
            //Console.WriteLine("本班共有{0}人,总成绩为{1}分，平均成绩为{2}分",
            //    a, sum, sum / a);





            //练习二

            //Console.WriteLine("这道题你会做吗？(y/n)");
            //string we = Console.ReadLine();
            //int i = 0;
            //while (we=="n" && i<10)
            //{
            //    Console.WriteLine("讲{0}遍题",i+1);
            //    i++;
            //    Console.WriteLine("这道题你会做吗？(y/n)");
            //    we = Console.ReadLine();
            //}
            //    Console.WriteLine("放学");



            //练习三
            //int hum = 2006;
            //double ren = 80000;
            //while (ren<200000)
            //{
            //    ren = ren * 1.25; //计算人数增加25%的值               
            //    hum++;
            //}
            //Console.WriteLine(hum);



            Console.ReadKey();
        }
    }
}
